public class Col_nine {
    public static void main(String[] args) {
        int count=0;
        for(int i=1;i<=100;i++){
            int n=i;
            while(n>0)
            {
                if(n%10==9)
                    count++;
                n/=10;
            }
        }
        System.out.println(count);
    }
}
